import Vue from 'vue'
import { createRouter, createWebHistory } from 'vue-router';
import staticRoute from 'common/router/routes/static-route.js';
import dynamicRoute from 'common/router/routes/dynamic-route.js';
import test from './routes/test.js';

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes: [...staticRoute,...dynamicRoute,...test],
});

router.beforeEach((to, from, next) => {
  // 这个位置做一些关于传参，重定向等事情
  next()
})
// RouterModel.afterEach(() => {
//   Toast.clear()
// })
 
export default router